package com.ryze.common.dubbo.project;

import org.apache.dubbo.common.config.OrderedPropertiesProvider;

import java.util.Properties;

public class ProjectPropertiesConfiguration implements OrderedPropertiesProvider {
    @Override
    public int priority() {
        return 0;
    }

    @Override
    public Properties initProperties() {
        Properties properties = new Properties();
        if(ProjectEnvUtils.isProjectEnv()){
            properties.put("dubbo.provider.group",ProjectEnvUtils.getGroup());
            properties.put("dubbo.consumer.group","*");
        }
        return properties;
    }
}
